<template>
  <div class="box box-data">
    <div class="text-small">
      <img :src="data.img" class="weapon-img"/>
      <img src="http://gamer.qq.com/images/firdatebase/date-icon.png" class="prod" v-if="data.prod"/>
      <div class="text" v-if="!shark">
        <div><span class="name"> {{data.name}} </span></div>
        <div class="text-point">
          <span>
            <label>攻击</label>{{data.act}}
          </span>
          <span v-if="data.attr&&data.attr!=''">
            <label></label>{{data.attr}}
          </span>
          <span v-if="data.crit&&data.crit!=''">
            <label>会心</label>{{data.crit}}
          </span>
        </div>
      </div>
      <div class="text" v-else>
        <div><span class="name"> {{data.name}} </span></div>
        <div class="bar-container">
          <shark-bar :data="data.shark"/>
        </div>
      </div>

    </div>
  </div>
</template>
<script>
import sharkBar from '@/components/weapon/SharkBar'
export default {
  props: [
    'data', 'shark'
  ],
  components: {
    sharkBar
  }
}
</script>
<style scoped>
.weapon-img{
  width: 26px;
  height:26px;
}
.prod{
  width: 10px;
  height:10px;
}
.text-small{
  font-size: 12px;
}
.text{
  margin-left: 6px;
  display: inline-block;
  line-height: 14px;
}
.name {
 color: #0084ff;
 font-weight: bold;
}
.text label{
  color: #575757;
}
.text-point{
  font-size: 10px;
  font-weight: bold;
  color: #757575;
}
.text-point span{
  margin-right: 4px;
}
</style>
